package com.wyt.dao.mapper;

import com.wyt.pojo.Likes;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface LikesMapper {
    // 返回指定Ability的点赞数
    int countLikes(int ability_id);

    // 修改用户能力点赞状态
    void changeStatus(int user_id, int ability_id);

    // 查询用户能力点赞状态
    boolean queryLikeStatus(int user_id, int ability_id);

    // 按照用户id、能力id、点赞状态插入数据。初始化表时使用
    void initLikes(int user_id, int ability_id, int like_status);
}
